package com.magnificent.atlantis.client.data.configuration;

import javax.xml.bind.annotation.XmlAttribute;

/**
 * User: Babanin
 * Date: 04.02.2009
 * Time: 13:35:42
 */
public abstract class AbstractConfiguration {

    private int id;

    private String name;
    private String description;

    protected AbstractConfiguration() {
        id = -1;
        name = "";
        description = "";
    }

    @XmlAttribute()
    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    @XmlAttribute()
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    @XmlAttribute()
    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public boolean isServerConfiguration() {
        return this instanceof ServerConfiguration;
    }

    @Override
    public String toString() {
        return name;
    }
}
